package com.itheima.dome.studentmanagementsystem;

import java.util.ArrayList;

public class Student extends ArrayList<Student> {
    private String name;
    private String id;
    private  int age;

    public Student() {
    }

    public Student(String name, String id, int age) {
        this.name = name;
        this.id = id;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
    //toString

    @Override
    public String toString() {
        return "Student{" +
                "姓名='" + name + '\'' +
                ", 学号='" + id + '\'' +
                ", 年龄=" + age +
                '}';
    }
}
